package com.service.impl;

import com.dao.ShiliaoDAO;
import com.dao.impl.ShiliaoDAOImpl;
import com.service.ShiliaoService;
import com.vo.Shiliao;

import java.io.Serializable;
import java.util.Map;

/**
 * 食疗处方模块的Service层（业务层）的具体实现类，对ShiliaoService接口中定义的抽象方法作出具体的功能实现
 */
public class ShiliaoServiceImpl implements ShiliaoService {
    //@Override
    public void add(Shiliao vo) {
        ShiliaoDAO shiliaoDAO = new ShiliaoDAOImpl();
        shiliaoDAO.add(vo);
    }

    //@Override
    public void delete(long id) {
        ShiliaoDAO shiliaoDAO = new ShiliaoDAOImpl();
        shiliaoDAO.delete(id);
    }

    //@Override
    public void update(Shiliao vo) {
        ShiliaoDAO shiliaoDAO = new ShiliaoDAOImpl();
        shiliaoDAO.update(vo);
    }

    //@Override
    public Shiliao get(Serializable id) {
        ShiliaoDAO shiliaoDAO = new ShiliaoDAOImpl();
        return shiliaoDAO.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        ShiliaoDAO shiliaoDAO = new ShiliaoDAOImpl();
        return shiliaoDAO.list(params);
    }
}
